package literary.fuwenhao.com.myapplication;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

public class MyOrderActivity extends AppCompatActivity {
    TextView textView1,textView2,textView3,textView4;
    AllOrderFragment allOrderFragment;
    NotPaidFragment notPaidFragment;
    HavePaidFragment havePaidFragment;
    InvalidFragment invalidFragment;
    FragmentManager supportFragmentManager;
    FragmentTransaction transaction;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_order);
        allOrderFragment=new AllOrderFragment();
        supportFragmentManager = getSupportFragmentManager();
        transaction = supportFragmentManager.beginTransaction();
        transaction.add(R.id.myorder_ll,allOrderFragment,"tag");
        transaction.commit();
        textView1= (TextView) findViewById(R.id.all_tv);
        textView2= (TextView) findViewById(R.id.not_tv);
        textView3= (TextView) findViewById(R.id.paid_tv);
        textView4= (TextView) findViewById(R.id.invalid_tv);
        textView1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (null==allOrderFragment){
                    allOrderFragment=new AllOrderFragment();
                }else {

                }
            }
        });
    }

}
